<%--
  Created by IntelliJ IDEA.
  User: LENOVO
  Date: 2020/11/30
  Time: 13:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
</head>
<body>
ajax
<script>
    var userlist2=new Array();
    userlist2.push({name:"zhangsan",age:18})
    userlist2.push({name:"zhangsan2",age:182})
    $(function(){
        $.ajax(
            {
                url:"${pageContext.request.contextPath}/son/son5",
                data:JSON.stringify(userlist2),   //转换为JSON
                type:"POST",
                contentType:"application/json;charset=utf-8"


            }
        )


    })
</script>



</body>
</html>
